//
//  PosterCell.m
//  卢卡的时光网
//
//  Created by 卡神 on 15/7/24.
//  Copyright © 2015年 lok. All rights reserved.
//

#import "PosterCell.h"
#import "UIImageView+WebCache.h"
#import "common.h"
#import "UIViewExt.h"

@implementation PosterCell

- (nonnull instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        CGFloat width = self.bounds.size.width * 0.9;
        CGFloat height = self.bounds.size.height * 0.9;
        _image = [[UIImageView alloc] initWithFrame:CGRectMake((self.width - width) / 2, (self.height - height) / 2, width, height)];
        [self.contentView addSubview:_image];
    }
    return self;
}

- (void)setImageUrl:(NSString *)imageUrl {
    _imageUrl = imageUrl;
    [_image sd_setImageWithURL:[NSURL URLWithString:_imageUrl] placeholderImage:[UIImage imageNamed:@"8"]];
}

@end
